﻿using JY.Wpf.Core.ViewModelBases;
using JY.Wpf.TestForMetro.Views.CaliburnDemoViews;
using SD.IOC.Core.Mediators;

namespace JY.Wpf.TestForMetro.ViewModels.CaliburnDemoViewModels
{
    public class EventAggregatorViewModel : ViewModelBase
    {
        #region # 变量

        #endregion

        #region # 构造器
        /// <summary>
        /// 构造器
        /// </summary>
        public EventAggregatorViewModel()
        {

        }
        #endregion

        #region # 属性

        #endregion

        #region # Command方法
        #region # 打开网站——void OpenWebSite()
        /// <summary>
        /// 打开网站
        /// </summary>
        public void OpenWebSite()
        {
            //调用系统默认的浏览器 
            System.Diagnostics.Process.Start("https://www.cnblogs.com/3Tai/p/3485215.html");
        }
        #endregion
        #endregion

        #region # 方法

        #endregion

        #region # 获取页面 —— object GetView(object context = null)
        /// <summary>
        /// 获取页面
        /// </summary>
        /// <param name="context">页面</param>
        /// <returns></returns>
        public override object GetView(object context = null)
        {
            return ResolveMediator.Resolve<EventAggregatorView>();
        }
        #endregion
    }
}
